package com.hzncc.flowable_diboot.vo;

import com.diboot.core.binding.annotation.*;
import com.diboot.core.vo.FileVO;
import com.diboot.core.vo.LabelValue;
import com.diboot.iam.entity.IamOrg;
import com.diboot.iam.entity.IamPosition;
import com.diboot.iam.entity.IamRole;
import com.diboot.iam.entity.IamUser;
import com.diboot.file.entity.FileRecord;
import com.diboot.tenant.entity.IamTenant;
import com.hzncc.flowable_diboot.entity.SalesGroupContent;
import com.hzncc.flowable_diboot.entity.SapCustomer;
import com.hzncc.flowable_diboot.entity.Customer;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.List;
/**
* 销售组织目录 VO定义
* @author MyName
* @version 1.0
* @date 2024-06-05
* Copyright © MyCorp
*/
@Getter @Setter @Accessors(chain = true)
public class SalesGroupContentListVO extends SalesGroupContent  {
private static final long serialVersionUID = 1269674728404793735L;
    /**
    * 公司代码 关联字典选项
    */
    @BindDict(
    type = "COMPANY_CODE",
    field = "companyCode"
    )
    private LabelValue companyCodeLabel;

    /**
    * 销售组织 关联字典选项
    */
    @BindDict(
    type = "salesGroup",
    field = "salesGroup"
    )
    private LabelValue salesGroupLabel;

    /**
    * 分销渠道 关联字典选项
    */
    @BindDict(
    type = "DISTRIBUTE_CHANNEL",
    field = "distributeChannel"
    )
    private LabelValue distributeChannelLabel;

    /**
    * 产品组 关联字典选项
    */
    @BindDict(
    type = "PRODUCTION_GROUP",
    field = "productionGroup"
    )
    private LabelValue productionGroupLabel;

    /**
    * sap客户id 关联信息
    */

    @BindField(
        entity = SapCustomer.class,
        field = "sapNo",
        condition = "this.sap_customer_id = id"
     )
    private String sapCustomerIdLabel;

    /**
    * 销售员 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.salesman = id"
     )
    private String salesmanLabel;

    /**
    * crm客户id 关联信息
    */

    @BindField(
        entity = Customer.class,
        field = "name",
        condition = "this.crm_customer_id = id"
     )
    private String crmCustomerIdLabel;

    /**
    * 创建人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.create_by = id"
     )
    private String createByLabel;

    /**
    * 更新人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.update_by = id"
     )
    private String updateByLabel;

}